<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head th:replace="~{fragments/header :: header}">
</head>
<body class="blog-font">

<!-- Page content -->
<div class="container blog-content-container">
    <form th:action="@{~/login}" method="post">
        <h2>请登录</h2>

        <div class="form-group col-md-5">
            <label for="username" class="col-form-label">账号</label>
            <input type="text" class="form-control" name="username" id="username" maxlength="50" placeholder="请输入账号">
        </div>

        <div class="form-group col-md-5">
            <label for="username" class="col-form-label">密码</label>
            <input type="password" class="form-control" name="password" id="password" maxlength="30" placeholder="请输入密码">
        </div>

        <div class="form-group col-md-5">
            <button type="submit" class="btn btn-primary">登录</button>
        </div>

        <div class="col-md-5" th:if="${loginError}">
            <p class="blog-label-error" th:text="${errorMsg}"></p>
        </div>

    </form>


</div> <!-- /.container-->
<div th:replace="~{fragments/footer :: footer}"></div>

</body>
</html>
